import { useState } from 'react';

function useScrollVisible() {
    const [scrollVisible, setScrollVisible] = useState({ x: false, y: false });
    const modifyScrollVisible = (k, v) => {        
        if (k in scrollVisible) {
            setScrollVisible((prevState)=>{
                return {...prevState,[k]:v};
            });
        }
    }    
    return { scrollVisible, modifyScrollVisible };
}
export default useScrollVisible;